Optimal. Leaf size=46 \[ -\frac {a (B+i A) \log (\cos (c+d x))}{d}+a x (A-i B)+\frac {i a B \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3525, 3475} \[ -\frac {a (B+i A) \log (\cos (c+d x))}{d}+a x (A-i B)+\frac {i a B \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3475
Rule 3525
Rubi steps
\begin {align*} \int (a+i a \tan (c+d x)) (A+B \tan (c+d x)) \, dx &=a (A-i B) x+\frac {i a B \tan (c+d x)}{d}+(a (i A+B)) \int \tan (c+d x) \, dx\\ &=a (A-i B) x-\frac {a (i A+B) \log (\cos (c+d x))}{d}+\frac {i a B \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 66, normalized size = 1.43 \[ -\frac {i a A \log (\cos (c+d x))}{d}+a A x-\frac {i a B \tan ^{-1}(\tan (c+d x))}{d}+\frac {i a B \tan (c+d x)}{d}-\frac {a B \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.66, size = 64, normalized size = 1.39 \[ -\frac {2 \, B a - {\left ({\left (-i \, A - B\right )} a e^{\left (2 i \, d x + 2 i \, c\right )} + {\left (-i \, A - B\right )} a\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.21, size = 103, normalized size = 2.24 \[ \frac {-i \, A a e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - B a e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - i \, A a \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - B a \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 2 \, B a}{d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 81, normalized size = 1.76 \[ \frac {i a B \tan \left (d x +c \right )}{d}+\frac {i a \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) A}{2 d}+\frac {a \ln \left (1+\tan ^{2}\left (d x +c \right )\right ) B}{2 d}-\frac {i a B \arctan \left (\tan \left (d x +c \right )\right )}{d}+\frac {a A \arctan \left (\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.81, size = 50, normalized size = 1.09 \[ \frac {2 \, {\left (d x + c\right )} {\left (A - i \, B\right )} a - {\left (-i \, A - B\right )} a \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 2 i \, B a \tan \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.06, size = 38, normalized size = 0.83 \[ \frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (B\,a+A\,a\,1{}\mathrm {i}\right )}{d}+\frac {B\,a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.42, size = 53, normalized size = 1.15 \[ \frac {2 B a}{- d e^{2 i c} e^{2 i d x} - d} - \frac {i a \left (A - i B\right ) \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________